<?php
session_start();

$cat_title =   $_POST['name'];
$cat_id = $_POST['id'];


    include "db_connect.php";
    $query = "UPDATE `category` SET `name` = '$cat_title' WHERE `id` = '$cat_id' ";
    if(mysql_query($query))
    header("location:../admin.php?page=cat_list");
        else{
        mysql_error();
        die("Update Failed");
        }

?>